package it.prova.elementedit;

import org.eclipse.jst.pagedesigner.dom.IDOMPosition;
import org.eclipse.jst.pagedesigner.itemcreation.AbstractTagCreationAdvisor;
import org.eclipse.jst.pagedesigner.itemcreation.CreationData;
import org.eclipse.jst.pagedesigner.itemcreation.command.ContainerCreationCommand;
import org.eclipse.jst.pagedesigner.itemcreation.command.ElementCustomizationCommand;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.w3c.dom.Element;

@SuppressWarnings("restriction")
public class MyTagCreationAdvisor extends AbstractTagCreationAdvisor
{	
	private CreationData creationData;
	
	public MyTagCreationAdvisor(CreationData creationData)
	{
		super(creationData);
		this.creationData = creationData;
	}
	
	@Override
	protected ElementCustomizationCommand getElementCustomizationCommand
	(
		IDOMModel model, 
		Element tagElement
	)
	{
		return new MyElementCustomizationCommand(model, tagElement, creationData);
	}

	@Override
	protected ContainerCreationCommand getContainerCreationCommand
	(
		IDOMPosition position
	)
	{
		return null;
	}
}